package com.lyr.query.dynamic.core.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import java.time.LocalDateTime;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * @author zk
 * 表 query_config
 */
@TableName(value ="query_config",autoResultMap = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ToString
public class QueryConfig {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 用户id
     */
    private Long userId;
    /**
     * 接口路径
     */
    private String path;
    /**
     * 查询条件
     */
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<QueryCondition> conditionsJson;

    /**
     * 创建时间
     */
//    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 租户id
     */
    private Long tenantId;

    /**
     * 更新时间
     */
//    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}